<?php
require 'hd/View.php';
require '../db.php';
class IndexController extends View{

	public $template_dir='template';
	public $cache_dir='cache_oc';
	public function index()
	{
		if(!$this->isCache())
		{
			$data = query("select * from stu limit 10");
			$this->assign('data',$data);
		}
		$this->display('index.html',10);
	}
}

$obj = new IndexController;
$obj->index();